package com.ebyte.controller;


import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;


@RestController
@Slf4j
public class HelloController {
    /**
     * 跨站脚本攻击
     */
    @GetMapping("/hello")
    public String helloWorld(@RequestParam("msg") String message) {
        System.out.println(message);
        String str = "<Script Language=\"Javascript\">alert(\"You've been attacked!\");console.log(\"Hey,you are a foolish fish.\")</Script>";
        return "<html><body><h1>您的消息：</h1>" + str + "</body></html>";
    }
}